<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    div:not(#app){
      padding: 50px;
    }
    .box1{
      background-color: rgb(190, 125, 125);
    }
    .box2{
      background-color: rgb(73, 199, 69);
    }
    .box3{
      background-color: rgb(89, 73, 107);
    }
  </style>
</head>
<body>
  <div id="app">
    <div class="box1" @click="fn1(1)">
      <div class="box2" @click="fn2(2)">
        <div class="box3" @click="fn3(3, $event)"></div>
      </div>
    </div>
  </div>
  <script src="./vue.global.js"></script>
  <script>
    const { createApp } = Vue;
    const app = createApp({
      data(){
        return {

        }
      },
      methods: {
        fn3(n, e){
          console.log(n);
          e.stopPropagation()
          
        },
        fn2(n){
          console.log(n);
        },
        fn1(n){
          console.log(n);
        }
      }
    })
    // 实例渲染
    app.mount('#app');
  </script>
</body>
</html>